package com.hzw.saas.api.user.query;

import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzw.saas.common.util.AccountValidatorUtil;
import com.hzw.saas.common.util.constants.PatternConsts;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author zzl
 * @since 04/04/2021
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("用户账户注册")
public class UserAccountAddQuery implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID", position = 1)
    private String userId;

    @ApiModelProperty(value = "用户名", position = 2, required = true)
    @NotBlank(message = "用户名不可为空")
    private String userName;

    @ApiModelProperty(value = "密码", position = 3, required = true)
    @NotBlank(message = "密码不可为空")
    private String password;

    @Pattern(regexp = AccountValidatorUtil.REGEX_CHINESE_NAME_OR_BLANK, message = "姓名格式不正确")
    @ApiModelProperty(value = "真实姓名", position = 4)
    private String realName;

    @ApiModelProperty(value = "电话号码", position = 5)
    @Pattern(regexp = AccountValidatorUtil.REGEX_MOBILE_OR_BLANK, message = "手机号码格式不正确")
    private String phoneNo;

    @ApiModelProperty(value = "邮箱地址", position = 6)
    @Pattern(regexp = AccountValidatorUtil.REGEX_EMAIL_OR_BLANK, message = "邮箱格式不正确")
    private String email;

    @ApiModelProperty(value = "注册日期", position = 7, hidden = true)
    @JsonFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    private Date registeredDate;

    @ApiModelProperty(value = "手机号验证时间", position = 8, hidden = true)
    @JsonFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    private Date phoneVerifyDate;

    @ApiModelProperty(value = "邮箱验证时间", position = 9, hidden = true)
    @JsonFormat(pattern = PatternConsts.NORM_DATETIME_PATTERN)
    private Date emailVerifyDate;

    @ApiModelProperty(value = "渠道ID", position = 10)
    private String channelId;

    @ApiModelProperty(value = "注册渠道", notes = "A:用户注册/销售手机号|B:后台开通/销售id|C:销售在线推广/销售id|D:单机软件/产品id|E:线上促销推广/活动id|F:线下活动扫码/活动id", position = 10)
    private String channelType;

    @ApiModelProperty(value = "渠道描述")
    private String channelDesc;

    @ApiModelProperty(value = "地区(省/市)", position = 11)
    private String region;

    @ApiModelProperty(value = "详细地址", position = 12)
    private String address;

    @ApiModelProperty(value = "机构(学校/企业)", position = 13)
    private String organ;

    @ApiModelProperty(value = "院系/部门", position = 14)
    private String department;

    @ApiModelProperty(value = "发票信息", position = 14)
    private String invoice;
}
